package com.example.carRental.entity;


import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.lang.Nullable;

import java.time.LocalDate;

public class Order {

  @Nullable
  private Integer id;
  
  private Integer customerId;
  private Integer carId;
  private Integer type;
  private Integer days;
  private Integer totalPrice;
  @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private LocalDate startDate; //生日

  public Order() {
  }

  public Order(@Nullable Integer id, Integer customerId, Integer carId, Integer type, Integer days, Integer totalPrice, LocalDate startDate) {
    this.id = id;
    this.customerId = customerId;
    this.carId = carId;
    this.type = type;
    this.days = days;
    this.totalPrice = totalPrice;
    this.startDate = startDate;
  }

  @Override
  public String toString() {
    return "Order{" +
            "id=" + id +
            ", customerId=" + customerId +
            ", carId=" + carId +
            ", type=" + type +
            ", days=" + days +
            ", totalPrice=" + totalPrice +
            ", startDate=" + startDate +
            '}';
  }

  public LocalDate getStartDate() {
    return startDate;
  }

  public void setStartDate(LocalDate startDate) {
    this.startDate = startDate;
  }

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }


  public Integer getCustomerId() {
    return customerId;
  }

  public void setCustomerId(Integer customerId) {
    this.customerId = customerId;
  }


  public Integer getCarId() {
    return carId;
  }

  public void setCarId(Integer carId) {
    this.carId = carId;
  }


  public Integer getType() {
    return type;
  }

  public void setType(Integer type) {
    this.type = type;
  }


  public Integer getDays() {
    return days;
  }

  public void setDays(Integer days) {
    this.days = days;
  }


  public Integer getTotalPrice() {
    return totalPrice;
  }

  public void setTotalPrice(Integer totalPrice) {
    this.totalPrice = totalPrice;
  }

}
